# gradeConsole.py - The grading application.

from fileProcessing import *
from consoleLogic import *

#Creates console object. Gets response file
console=consoleLogic()

console.selectFiles(['response file'],['.csv'])
responseFile=console.selectedFiles[0]

#Creates file processing object, gets number of questions, point values, and answers
fileProc=fileProcessing()
numOfQuestions=fileProc.getNumOfQuestions(responseFile)
console.getPoints(numOfQuestions)
answers=console.getAnswers(numOfQuestions)

#Grades the quiz
fileProc.gradeQuiz(responseFile,answers,console.pointsRightAnswer,console.pointsWrongAnswer,console.pointsNoAnswer,console.totalPointsStr)

#Holds for user
console.hold('The grading is complete. Push enter to exit.')
